package com.ganzalang.gmall.interfacespecification.fourth.exception;

import lombok.Getter;

/**
 * @description:
 * @author: Ganzalang
 * @Date 2021/3/30 20:46
 */
@Getter
public class APIException extends RuntimeException{

    private Integer code;

    private String msg;

    public APIException(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public APIException(String msg) {
        this(1001, msg);

    }

    public APIException() {
        this(1001, "接口错误");
    }
}
